﻿using System;

namespace OS.Common.Extention.DTO
{
    /// <inheritdoc />
    /// <summary>
    /// 列属性封装基类
    /// </summary>
    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = true)]
    public class BaseColumnAttribute : Attribute
    {
        /// <summary>
        /// 
        /// </summary>
        protected string _Alias;

        /// <summary>
        /// 
        /// </summary>
        protected bool _IsAuto;

        /// <summary>
        /// 
        /// </summary>
        protected bool _IsIgnore;

        /// <summary>
        /// 列简称
        /// </summary>
        public string Alias => this._Alias;

        /// <summary>
        /// 是否自增长列
        /// </summary>
        public bool IsAuto => this._IsAuto;

        /// <summary>
        /// 是否忽略当前列
        /// </summary>
        public bool IsIgnore => this._IsIgnore;
    }
}